package com.skstudio.reportview;

import com.skstudio.report.ReportWifiConn;
import com.skstudio.report.SpyData;

public class ReporterWifiConn extends ReportViewController {

    ReportWifiConn mWifiConn = null;

    @Override
    public void setSpyData(SpyData ref) {
        super.setSpyData(ref);
        mWifiConn = ref.getReportWifiConn();
    }

    @Override
    public int getReportRows() {
        return 1;
    }

    @Override
    public int getReportColumns() {
        return mWifiConn.mDataList.size();
    }

    @Override
    public int getEntry(int row, int col) {
        if (row == 0 && mWifiConn.mDataList.size() > col) {
            return (int) mWifiConn.mDataList.get(col).getLevel();
        }
        return 0;
    }

    @Override
    public String getReportDescription() {
        return "Wifi Signal Level";
    }

    @Override
    public String getEntryName(int row) {
        switch (row) {
            case 0:
                return "The wifi connection signal level";
        }
        return null;
    }
}
